﻿using System;
using System.Data;
using System.Linq;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    public partial class ITXEXRPT
    {

        private void JLTBB14(DataSet db)
        {
            try
            {/*<GPGART,GPGVAR,GPGFARBE,GPSPPART,GPFBPART,GPZWPART,GABLO,GABLB,GABBUCHDAT,INQTY,PRODIN ,OUTQTY, ADJQTY--> */
                DataTable dtSoruce = db.Tables["BABEW"];
                DataTable dtOutput = new DataTable();
                dtOutput.Columns.Add("BBBUCHDAT", typeof(System.String));
                dtOutput.Columns.Add("BMLO", typeof(System.String));
                dtOutput.Columns.Add("BMLB", typeof(System.String));
                dtOutput.Columns.Add("BMLP", typeof(System.String));
                dtOutput.Columns.Add("BMKART", typeof(System.String));
                dtOutput.Columns.Add("BMFARBE", typeof(System.String));
                dtOutput.Columns.Add("MTR", typeof(System.String));
                dtOutput.Columns.Add("BBBAUMKRS", typeof(System.String));
                dtOutput.Columns.Add("BBBAUMLFD", typeof(System.String)); 
                 
                dtOutput.Clear();
                dtOutput.Merge(dtSoruce, false, MissingSchemaAction.Ignore);
                exAgent.DataTableToExcel(dtOutput, 2, 1);
                int count = dtOutput.Rows.Count;
                


            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
        
    }
}